package model

import (
	"gorm.io/gorm"
	"time"
)

type Team struct {
	Id          uint64         `gorm:"column:id;type:bigint(20) UNSIGNED;primaryKey;not null;" json:"id"`
	TeamName    string         `gorm:"column:team_name;type:varchar(30);comment:团队名称;not null;" json:"team_name"`         // 团队名称
	TeamAddress string         `gorm:"column:team_address;type:varchar(30);comment:团队地址;not null;" json:"team_address"`   // 团队地址
	TeamNum     uint64         `gorm:"column:team_num;type:bigint(20) UNSIGNED;comment:签约人数;not null;" json:"team_num"`   // 签约人数
	DoctorId    uint64         `gorm:"column:doctor_id;type:bigint(20) UNSIGNED;comment:医生编号;not null;" json:"doctor_id"` // 医生编号
	CreatedAt   time.Time      `gorm:"column:created_at;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" json:"created_at"`
	UpdatedAt   time.Time      `gorm:"column:updated_at;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" json:"updated_at"`
	DeletedAt   gorm.DeletedAt `gorm:"column:deleted_at;type:datetime(3);default:NULL;" json:"deleted_at"`
}

func (t *Team) TableName() string {
	return "team"
}
